require("../../common/vendor.js"), (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pagesA/pages/movieA/detail2" ], {
    "20f6": function(e, n, a) {
        (function(i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            }), n.default = void 0;
            var e, o = (e = a("a34a")) && e.__esModule ? e : {
                default: e
            };
            function d(e, t, n, a, o, i, c) {
                try {
                    var r = e[i](c), d = r.value;
                } catch (e) {
                    return n(e), 0;
                }
                r.done ? t(d) : Promise.resolve(d).then(a, o);
            }
            var c = getApp(), t = {
                data: function() {
                    return {
                        module_name: c.globalData.module_name,
                        showAlert_login: !1,
                        userinfo: i.getStorageSync("userinfo"),
                        setting: i.getStorageSync("setting"),
                        wxCode: "",
                        systemtype: "",
                        empty: 0,
                        mainHeight: 900,
                        pageLoading: !0,
                        city: 0,
                        currentIndex: 0,
                        movie_id: 0,
                        movie_detail: [],
                        day: [],
                        day_detail: [],
                        date: 0,
                        pageIndex: 1,
                        pageSize: 20,
                        lon: 0,
                        lat: 0,
                        cinemaList: [],
                        loadingType: 0,
                        showId: ""
                    };
                },
                components: {
                    gracePage: (a("e5c8"), function() {
                        a.e("graceUI/components/gracePage").then(function() {
                            return resolve(a("1021"));
                        }.bind(null, a)).catch(a.oe);
                    }),
                    graceHeader: function() {
                        a.e("graceUI/components/graceHeader").then(function() {
                            return resolve(a("266b"));
                        }.bind(null, a)).catch(a.oe);
                    },
                    graceNavBar: function() {
                        a.e("graceUI/components/graceNavBar").then(function() {
                            return resolve(a("a631"));
                        }.bind(null, a)).catch(a.oe);
                    },
                    graceShade: function() {
                        a.e("graceUI/components/graceShade").then(function() {
                            return resolve(a("31ed"));
                        }.bind(null, a)).catch(a.oe);
                    },
                    graceDialog: function() {
                        a.e("graceUI/components/graceDialog").then(function() {
                            return resolve(a("f85d"));
                        }.bind(null, a)).catch(a.oe);
                    },
                    graceLoading: function() {
                        a.e("graceUI/components/graceLoading").then(function() {
                            return resolve(a("1d04"));
                        }.bind(null, a)).catch(a.oe);
                    },
                    graceFlex: function() {
                        a.e("graceUI/components/graceFlex").then(function() {
                            return resolve(a("b5c9"));
                        }.bind(null, a)).catch(a.oe);
                    },
                    graceSearch: function() {
                        a.e("graceUI/components/graceSearch").then(function() {
                            return resolve(a("de21"));
                        }.bind(null, a)).catch(a.oe);
                    },
                    graceEmptyNew: function() {
                        a.e("graceUI/components/graceEmptyNew").then(function() {
                            return resolve(a("f8df"));
                        }.bind(null, a)).catch(a.oe);
                    }
                },
                props: {},
                onShow: function() {
                    this.userinfo = i.getStorageSync("userinfo"), i.hideLoading();
                },
                onReachBottom: function() {
                    1 != this.loadingType && 2 != this.loadingType && this.loadcinemaList();
                },
                onLoad: function(n) {
                    var r, a = this;
                    return r = o.default.mark(function e() {
                        var t;
                        return o.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, a.$onLaunched;

                              case 2:
                                (t = a).setting = i.getStorageSync("setting"), t.tabBar = i.getStorageSync("tabbar"), 
                                t.userinfo = i.getStorageSync("userinfo"), i.hideLoading(), t.city = i.getStorageSync("cityid"), 
                                i.getStorageSync("cityname") && i.getStorageSync("lat") && i.getStorageSync("lon") && (t.lat = i.getStorageSync("lat"), 
                                t.lon = i.getStorageSync("lon")), a.module_name = c.globalData.module_name, t.showId = n.filmid, 
                                t.movie_detail = i.getStorageSync("moviedetail"), 0 < t.city && 0 < t.lat ? a.loadmoviedetail() : a.getLocation();

                              case 15:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }), function() {
                        var e = this, c = arguments;
                        return new Promise(function(t, n) {
                            var a = r.apply(e, c);
                            function o(e) {
                                d(a, t, n, o, i, "next", e);
                            }
                            function i(e) {
                                d(a, t, n, o, i, "throw", e);
                            }
                            o(void 0);
                        });
                    }();
                },
                methods: {
                    opencinema: function(e) {
                        i.setStorageSync("cinemadetail", e.currentTarget.dataset.cinemaid), i.navigateTo({
                            url: "cinema?movie_id=" + e.currentTarget.dataset.movieid + "&cinema_id=" + e.currentTarget.dataset.cinemaid.cinemaId + "&date=" + e.currentTarget.dataset.date
                        });
                    },
                    navChange: function(e) {
                        this.currentIndex = e, this.cinemaList = [], this.pageIndex = 1, this.empty = 0, 
                        this.loadingType = 0, this.date = this.day[e], this.loadcinemaList(), i.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                    },
                    swiperChange: function(e) {
                        e = e.detail.current;
                        this.currentIndex = e, this.cinemaList = [], this.pageIndex = 1, this.empty = 0, 
                        this.loadingType = 0, this.date = this.day[e], this.loadcinemaList(), i.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                    },
                    getLocation: function() {
                        var n = this;
                        i.getLocation({
                            type: "wgs84",
                            success: function(e) {
                                var t = c.globalData.util.url("entry/wxapp/address", {
                                    m: c.globalData.module_name
                                });
                                i.setStorageSync("lon", e.longitude), i.setStorageSync("lat", e.latitude), i.request({
                                    url: t,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: {
                                        lon: e.longitude,
                                        lat: e.latitude
                                    },
                                    success: function(e) {
                                        i.setStorageSync("cityid", e.data.data.ci), i.setStorageSync("cityCode", e.data.data.cityCode), 
                                        i.setStorageSync("city", e.data.data.city), n.city = e.data.data.ci, n.lon = i.getStorageSync("lon"), 
                                        n.lat = i.getStorageSync("lat"), 0 < n.city && 0 < n.lat ? n.loadmoviedetail() : i.showModal({
                                            title: "系统提示",
                                            content: "请授权获取您的位置信息",
                                            showCancel: !0,
                                            success: function(e) {
                                                e.confirm && n.again_getLocation(), n.cityid = 0, n.lat = 0, n.lon = 0;
                                            }
                                        });
                                    }
                                });
                            },
                            fail: function(e) {
                                n.city = 0, n.lat = 0, n.lon = 0;
                            }
                        });
                    },
                    again_getLocation: function() {
                        var t = this;
                        i.getSetting({
                            success: function(e) {
                                null != e.authSetting["scope.userLocation"] && 1 != e.authSetting["scope.userLocation"] ? i.showModal({
                                    title: "是否授权当前位置",
                                    content: "需要获取您的地理位置，请确认授权，否则无法获取您所需数据",
                                    success: function(e) {
                                        e.cancel ? i.showToast({
                                            title: "授权失败",
                                            icon: "success",
                                            duration: 1e3
                                        }) : e.confirm && i.openSetting({
                                            success: function(e) {
                                                1 == e.authSetting["scope.userLocation"] ? (i.showToast({
                                                    title: "授权成功",
                                                    icon: "success",
                                                    duration: 1e3
                                                }), t.getLocation(t)) : i.showToast({
                                                    title: "授权失败",
                                                    icon: "success",
                                                    duration: 1e3
                                                });
                                            }
                                        });
                                    }
                                }) : (e.authSetting["scope.userLocation"], t.getLocation(t));
                            }
                        });
                    },
                    confirm: function(e) {
                        this.value1 = e, this.loadmovielist();
                    },
                    clear: function(e) {
                        this.value1 = "", this.loadmovielist();
                    },
                    showDialog2: function() {
                        this.$refs.showAlert_login.open();
                    },
                    closeDialog2: function() {
                        this.$refs.showAlert_login.hide();
                    },
                    loadmoviedetail: function() {
                        i.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                        var t = this, e = c.globalData.util.url("entry/wxapp/filmdetail", {
                            m: c.globalData.module_name
                        });
                        i.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: i.getStorageSync("openid"),
                                cityid: i.getStorageSync("cityid"),
                                lon: i.getStorageSync("lon"),
                                lat: i.getStorageSync("lat"),
                                showId: t.showId
                            },
                            success: function(e) {
                                return 200 != e.data.code ? (t.empty = 1, t.loadingType = 4, i.hideLoading(), void i.showModal({
                                    title: "系统提示",
                                    content: "影片详情获取失败，是否重试？",
                                    showCancel: !0,
                                    success: function(e) {
                                        e.confirm && t.loadmoviedetail();
                                    }
                                })) : e.data.data.dateList && null != e.data.data.dateList ? (t.day = e.data.data.dateList, 
                                t.date = e.data.data.dateList[0], t.pageIndex = 1, t.currentIndex = 0, t.loadcinemaList(), 
                                void i.setNavigationBarTitle({
                                    title: t.movie_detail.showName
                                })) : (t.empty = 1, t.loadingType = 4, void i.hideLoading());
                            }
                        });
                    },
                    loadcinemaList: function() {
                        var t = this, e = c.globalData.util.url("entry/wxapp/schedule", {
                            m: c.globalData.module_name
                        });
                        this.loadingType = 1, i.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: i.getStorageSync("openid"),
                                cityid: i.getStorageSync("cityid"),
                                cityCode: i.getStorageSync("cityCode"),
                                lon: i.getStorageSync("lon"),
                                lat: i.getStorageSync("lat"),
                                date: t.date,
                                pageIndex: t.pageIndex,
                                pageSize: t.pageSize,
                                showId: i.getStorageSync("moviedetail").filmId
                            },
                            success: function(e) {
                                200 == e.data.code && 0 < e.data.data.list.length ? (t.cinemaList = t.cinemaList.concat(e.data.data.list), 
                                i.hideLoading(), 0 == e.data.data.hasMore ? t.loadingType = 4 : 1 == e.data.data.hasMore && (t.pageIndex = t.pageIndex + 1, 
                                t.loadingType = 0)) : (t.empty = 1, i.hideLoading(), t.loadingType = 4);
                            }
                        });
                    },
                    userlogin: function() {
                        i.getStorageSync("userinfo").nickname || 1 != i.getStorageSync("setting").login_type ? this.closeDialog2() : this.showDialog2();
                    },
                    login: function(t) {
                        var n = this;
                        this.closeDialog2(), i.getSetting({
                            success: function(e) {
                                e.authSetting["scope.userInfo"] ? i.getUserInfo({
                                    success: function(e) {
                                        n.userAuth(t, e.userInfo, "login");
                                    }
                                }) : n.userAuth(t, null, "login");
                            }
                        });
                    },
                    getWxCode: function() {
                        var t = this;
                        wx.login({
                            success: function(e) {
                                t.wxCode = e.code;
                            }
                        });
                    },
                    userAuth: function(n, e, a) {
                        var o = this;
                        "getUserInfo:ok" == n.detail.errMsg ? wx.login({
                            success: function(e) {
                                var t = c.globalData.util.url("entry/wxapp/api", {
                                    m: c.globalData.module_name,
                                    o: "userinfo"
                                }), e = {
                                    code: e.code,
                                    encryptedData: n.detail.encryptedData,
                                    iv: n.detail.iv,
                                    openid: i.getStorageSync("openid"),
                                    invite_uid: wx.getStorageSync("invite_uid")
                                };
                                i.request({
                                    url: t,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: e,
                                    success: function(e) {
                                        1 == e.data.status ? (e = c.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), 
                                        e = JSON.parse(e), i.setStorageSync("userinfo", e.userinfo), o.userinfo = e.userinfo, 
                                        "login" == a && (o.closeDialog2(), i.showToast({
                                            title: "登录成功",
                                            icon: "none"
                                        })), 1 == o.currentIndex ? o.load_mtscqrcode2() : o.load_mtwmqrcode2()) : i.showToast({
                                            title: "您取消了请求",
                                            icon: "none"
                                        });
                                    }
                                });
                            }
                        }) : i.showToast({
                            title: "获取用户信息失败",
                            icon: "none"
                        });
                    },
                    closeAlert: function() {
                        this.closeDialog2();
                    }
                }
            };
            n.default = t;
        }).call(this, a("543d").default);
    },
    "272b": function(e, t, n) {
        n.r(t);
        var a, o = n("3129"), i = n("d252");
        for (a in i) "default" !== a && function(e) {
            n.d(t, e, function() {
                return i[e];
            });
        }(a);
        n("3365");
        var c = n("f0c5"), o = Object(c.a)(i.default, o.b, o.c, !1, null, null, null, !1, o.a, void 0);
        t.default = o.exports;
    },
    3129: function(e, t, n) {
        n.d(t, "b", function() {
            return a;
        }), n.d(t, "c", function() {
            return o;
        }), n.d(t, "a", function() {});
        var a = function() {
            var e = this, t = (e.$createElement, e._self._c, e.movie_detail.publishDate ? e.movie_detail.publishDate.substring(0, 10) : null);
            e.$mp.data = Object.assign({}, {
                $root: {
                    g0: t
                }
            });
        }, o = [];
    },
    "31f6": function(e, t, n) {},
    3365: function(e, t, n) {
        var a = n("31f6");
        n.n(a).a;
    },
    b7c6: function(e, t, n) {
        (function(e) {
            function t(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            n("0cda"), t(n("66fd")), e(t(n("272b")).default);
        }).call(this, n("543d").createPage);
    },
    d252: function(e, t, n) {
        n.r(t);
        var a, o = n("20f6"), i = n.n(o);
        for (a in o) "default" !== a && function(e) {
            n.d(t, e, function() {
                return o[e];
            });
        }(a);
        t.default = i.a;
    }
}, [ [ "b7c6", "common/runtime", "common/vendor" ] ] ]);